import java.util.Scanner;
public class Task09 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		int n = sc.nextInt();
		sc.close();
		
		if (n < m){
			int tmp = m;
			m = n;
			n = tmp;
		}
		
		System.out.print("Na 2: ");
		for (int i=m+1;i<n;i++){
			if (i % 2 == 0)
				System.out.print(i + " ");
		}
		
		System.out.print("Na 3: ");
		for (int i=m+1;i<n;i++){
			if (i % 3 == 0)
				System.out.print(i + " ");
		}
		
		System.out.print("Na 5: ");
		for (int i=m+1;i<n;i++){
			if (i % 5 == 0)
				System.out.print(i + " ");

		}
	}
}
